<%@page import="org.springframework.context.annotation.Bean"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@page import="cn.egame.common.model.PageData"%>
<%@page import="java.util.List"%>
<%@page import="cn.egame.ext.op.OperationActivityInfo"%>
<%@page import="com.egame.manage.biz.server.pu.ParameterServiceImpl"%>
<%@page import="cn.egame.ext.EnumTypeExt"%>
<%@page import="cn.egame.common.util.Utils"%>
<%@page import="com.egame.manage.biz.server.UserServiceImpl"%>
<%@page import="com.lenovo.manager.business.domain.UserBean"%>
<%@page import="com.egame.manage.biz.utils.ConstVar"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link type="text/css" rel="stylesheet" href="<%=request.getContextPath()%>/css/main.css"  />
<title>广告活动列表</title>
<% 
	int para = 0;
	if(request.getAttribute("para")!=null){
		para = (Integer)request.getAttribute("para");
	}
%>
</head>
<body>
<form action="" id="myform">	
	<input type="hidden" name=para value=<%=para %>>
	<div class="matter_box">
		<h3 class="nopoint"><strong>广告活动列表</strong></h3>		
		<div class="matter_text clearfix nobg mart">
			<table cellpadding="0" cellspacing="0" class="table2" id="rights_list">
				<tr class="first">
					<th>位置</th>
					<th>标题</th>
					<th>类型</th>
					<th>开始时间</th>
					<th>结束时间</th>
					<th>操作人</th>
					<th>操作时间</th>
				</tr>
	<%
		if(request.getAttribute("pd")!= null){
			PageData pd = (PageData) request.getAttribute("pd");
			if(pd.getContent()!=null){
				List<OperationActivityInfo> list = (List<OperationActivityInfo>)pd.getContent();
				for(OperationActivityInfo bean:list){
					%>
					<tr>
						<td align=center><%=EnumTypeExt.OperationActivityPosition.lookup(bean.getPosition()).getMessage() %></td>
						<td align=center><%=bean.getDescription() %></td>
						<td align=center><%=(bean.getRecordType()).getMessage() %></td>
						<% 
							String time = "";
							if(bean.getBeginTime() != null){
								time = Utils.toDateString(bean.getBeginTime(),"yyyy-MM-dd hh:mm:ss");
							}
							String endtime = "";
							if(bean.getEndTime() != null){
								endtime = Utils.toDateString(bean.getEndTime(),"yyyy-MM-dd hh:mm:ss");
							}
							String operatetime = "";
							if(bean.getUpdateTime() != null){
								operatetime = Utils.toDateString(bean.getUpdateTime(),"yyyy-MM-dd hh:mm:ss");
							}
						%>
						<td align=center><%=time %></td>
						<td align=center><%=endtime %></td>
						<td align=center><%=UserServiceImpl.getInstance().getCnNameById(bean.getOperatorId()) %></td>
						<td align=center><%=operatetime %></td>						
					</tr>
					<%
				}
			}
		}
	%>
</table>
<%@ include file="../page.in"  %> 
</div>
</div>
</form>
</body>
</html>